package vip.gnloypp.redis.mq.api.config;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.data.redis.connection.RedisConnectionFactory;

import java.util.Arrays;
import java.util.List;

/**
 * @author GuoNanLin
 * @since 2024/8/30 16:04
 */
@Getter
@Setter
@Accessors(chain = true)
public class RedisReceiverConfig {

    /**
     * redis工厂
     */
    private RedisConnectionFactory redisConnectionFactory;
    /**
     * 队列配置
     */
    private List<RedisReceiverQueueConfig> redisReceiverQueueConfigs;
    /**
     * 环境
     */
    private String env;
    /**
     * 日志前缀
     */
    private String logPrefix;

    public RedisReceiverConfig setRedisReceiverQueueConfigs(RedisReceiverQueueConfig... redisReceiverQueueConfigs) {
        this.redisReceiverQueueConfigs = Arrays.stream(redisReceiverQueueConfigs).toList();
        return this;
    }

}
